<!DOCTYPE html>

<html>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="ditevents, социальная сеть, мероприятия" />
<meta name="description" content="Социальная сеть для организации мероприятий" />
<meta name="author" content="Inadequate team" />
<meta name="robots" content="all" />
	
<head>
  <title>{% block title %}DIT Events{% endblock %}</title>
  {% block scripts %}
  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" type="text/javascript"></script>
  <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/jquery-ui.min.js" type="text/javascript"></script>
  <script src="{{ STATIC_URL }}js/dialog.js" type="text/javascript"></script>
  <script src="{{ STATIC_URL }}js/login.js" type="text/javascript"></script>
  <script src="{{ STATIC_URL }}js/popupform.js" type="text/javascript"></script>
  {% endblock %}
  {% block styles %}
  <link rel="stylesheet" type="text/css" title="style" href="{{ STATIC_URL }}css/base.css" />
  <link rel="stylesheet" type="text/css" title="style" href="{{ STATIC_URL }}css/buttons.css" />
  <link rel="stylesheet" type="text/css" title="style" href="{{ STATIC_URL }}css/jquery-ui-1.8.13.custom.css" />
  {% endblock %}
</head>

<body>
  <div id="wrapper_border">
  	<div id="border_overlay"></div>
  </div>
  <div id="wrapper">
  	<div id='status_bar'>
      {% if user %}
        <p id="welcome"><a href="{% url core.views.profile.details %}">{{ user.name }} </a>|
        <a href="{% url core.views.auth.logout %}"> выйти</a></p>
      {% else %}
        <div class="log_form">
		  Здравствуйте, <a href="#" OnClick="openlogform()">войдите</a>
		  <div id="log_form" class="window">
		    <form action="{% url core.views.auth.login %}" method="post">  
			  <a href="#" onClick="openlogform()" class="close">Закрыть</a>  
				<label>Логин: </label>
		          {{ login_form.login }}<br>
		        <label>Пароль: </label>
		          {{ login_form.password }}
				  <input id="status_bar_login" type="submit" value="Войти" class="btn gray" />
	        </form>
	      </div>
		  или 
		  <a id="register" href="#">зарегистрируйтесь</a>
		</div>
      {% endif %}
    </div>
    {% block header %}
    <header>
      <h1 id="logo">
        <a href="{% url core.views.index %}" title="Главная страница">
          <img src="{{ STATIC_URL }}img/logo.png" />
        </a>
      </h1>
	  <div id="global_menu_bg"></div>
      <ul id="global_menu">
        <li id="global_home">
          <a href="{% url core.views.index %}" title="Перейти на главную страницу" class="current">Главная</a>
        </li>
        <li id="global_profile">
          <a href="{% url core.views.profile.details %}" title="Профиль">Профиль</a>
        </li>
        <li id="global_events">
          <a href="{% url core.views.event.list %}" title="Мероприятия">Мероприятия</a>
        </li>
      </ul>  
    </header>
    {% endblock %}

    <div id="content_top_shadow"></div>
    <div id="content">
      {% block content %}
      {% endblock %}
	</div> 
  
    {% block footer %}
    <footer>
      <p id="footer_menu">
        <a id="footer_home" href="{% url core.views.index %}" title="Главная страница">Главная</a>
        <a href="{% url core.views.profile.details %}" title="Профиль">Профиль</a>
        <a href="{% url core.views.event.list %}" title="Мероприятия">Мероприятия</a>
      </p> 
      <p id="footer_text">Copyleft 2011 DIT.Events</p>
    </footer>
    {% endblock %}
  </div> 

<!-- REGISTER -->  
  <div id="dialog" title="Создание нового пользователя">
    <form action="" method="post">
      {{ form.as_p }}
    </form>
  </div>  
</body>
</html>
